<?php 
class em_model extends CI_Model {
        function __construct()
        {
                parent::__construct();        
                $this->load->helper("local");
                $this->load->helper('date');
                $this->load->database();
        } 
//START-----------------em-------------------------//              
        
		
		function get_all_em()
        {
			    $this->load->database();
                $query = $this->db->query("select * from em_profile where profile_type='em' order by l_name ASC");
			return $query->result();
        }
function getemSearchByfull_name($full_name)
       {       $query = $this->db->query ("select * from em_profile where f_name like '%$full_name%' or l_name like '%$full_name%' order by l_name ASC Limit 10 ");
				return $query->result();
       }
		
        function getem_info($code)
        {        
                $query = $this->db->query("select *from em_profile where employee_code='$code'");
                 //return $query->result();
				 return $query->row();

				 
        }

//End-----------------em -------------------------//              		

}
?>
